import BaseModel from "../../cfw/mvc/BaseModel";
import ModelManager from "../../cfw/mvc/ModelManager";
import CookieToyModel from "./model/CookieToyModel";
import ModuleManager from "../../cfw/module/ModuleManager";
import BottleItemModel from "./model/BottleItemModel";




export default class CookeryManager extends BaseModel {

    private static ins: CookeryManager;


    static instance() {
        if (!this.ins) {
            this.ins = new CookeryManager()
        }
        return this.ins;
    }


    private toyMgr: ModelManager<CookieToyModel> = new ModelManager()

    protected bottleMgr: ModelManager<BottleItemModel> = new ModelManager()

    constructor() {
        super();
        this.toyMgr.initWithData(ModuleManager.dataManager.get(CookieToyModel.CLASS_NAME), CookieToyModel)
        this.bottleMgr.initWithData(ModuleManager.dataManager.get(BottleItemModel.CLASS_NAME), BottleItemModel)
    }
    getList() {
        return this.toyMgr.getList()
    }

    getBottleList() {
        return this.bottleMgr.getList()
    }

}